package net.system.common;

import java.util.List;

import net.system.base.module.Column;

public class BeanUtils {
	public static String getVal(List<Column> columns) {
		String sReturn = "";
		if (null != columns && columns.size() > 0) {
			for (Column column : columns) {
				if (null != column.getValue() && !"".equals(column.getValue())) {
					// 加上类型判断
					sReturn += ",'" + column.getValue() + "'";
				}
			}
		}
		return sReturn.substring(1);
	}

	public static String getCol(List<Column> columns) {
		String sReturn = "";
		if (null != columns && columns.size() > 0) {
			for (Column column : columns) {
				if (null != column.getValue() && !"".equals(column.getValue())) {
					sReturn += "," + column.getName();
				}
			}
		}
		return sReturn.substring(1);
	}
}
